/**
 * Created by zhaoxk on 2017/2/24.
 */
import React from 'react';
import NoneData from '../../../components/none-data/';
import TitleList from '../../../components/title-list/';
import LabelList from '../../../components/label-list/';
/*
* 以下组件与业务数据结构耦合太强，只能定制，因此不放入components目录
* */
import Sign from './sign';
import Suggest from './suggest';
import Inspect from './inspect';
import Check from './check';
import Operator from './operator';
import Cost from './cost';

function PatientRight({ data, UIType }) {
    if (data instanceof Array && data.length > 0) {
        switch (UIType) {
        case 'titleList':
            return (
                <TitleList
                    data={data}
                />
            );
        case 'sign':
            return (
                <Sign
                    data={data}
                />
            );
        case 'suggest':
            return (
                <Suggest
                    data={data}
                />
            );
        case 'inspect':
            return (
                <Inspect
                    data={data}
                />
            );
        case 'check':
            return (
                <Check
                    data={data}
                />
            );
        case 'operator':
            return (
                <Operator
                    data={data}
                />
            );
        case 'cost':
            return (
                <Cost
                    data={data}
                />
            );
        default:
            return (
                <NoneData text="UI框架没准备好" />
            );
        }
    }
    if (data instanceof Object) {
        return (
            <LabelList
                data={data}
            />
        );
    }
    return (
        <NoneData />
    );
}

export default PatientRight;
